﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XMLSpreadGear.Core;

namespace XMLSpreadGear.Headers
{
    public class Styles:BaseElement
    {
        private Style sStyle;

        public Style Style
        {
            get { return sStyle; }
            set { sStyle = value; }
        }

        public Styles()
            : base(LocalNames.STYLES)
        {
        }

        public Styles(Style style)
            : this()
        {
            this.sStyle = style;
        }

        internal protected override IDictionary<string, string> RegisterElements()
        {
            IDictionary<string, string> dic = new Dictionary<string, string>();
            if(this.Style != null)
                dic.Add("Style", this.Style.ToString());

            return dic;

        }

        internal protected override IDictionary<string, string> RegisterAttributes()
        {
            IDictionary<string, string> dic = new Dictionary<string, string>();
            return dic;
        }

        protected override void SetDefaults()
        {
            return;
        }

        internal override string GetAttributeNamespace()
        {
            return Contstants.SpredsheetAttributePrefix;
        }

        internal override string GetAttributeNamespaceURI()
        {
            return Contstants.SpredsheetAttributeNamespace;
        }
    }
}
